package com.lonwin.inspectionmanagement.mvp.contract;

import android.app.Activity;

import com.amap.api.services.geocoder.RegeocodeAddress;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.NLocusSResult;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.PatrolBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.QueryNumBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.SearLocusBean;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.QueryMap;
import retrofit2.http.Url;


public interface HomeCruiseContract {
    //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
    interface View extends IView {
        Activity getActivity();
       void updateDataSuccess(String result);
       void startPatrolSuccess(PatrolBean patrolBean);
        void endPatrolSuccess(PatrolBean patrolBean);
        void regeocodeAddress(String address);


        void cpathTempSuccess(NLocusSResult.DataBean dataBean);
        void getMyLastXcpathSuccess(NLocusSResult.DataBean bean);
        void continueXcpathTemp(NLocusSResult.DataBean dataBean);
        void  getCheckCount(String content,int num);
    }

    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
    interface Model extends IModel {
        Observable<String> updateData(String url, Map<String,String> data);

        Observable<PatrolBean> startPatrol(@Url String url, @QueryMap Map<String,String> params);
        Observable<PatrolBean> endPatrol(@Url String url, @QueryMap Map<String,String> params);

        /**
         * 轨迹开始暂停结束
         * @param url
         * @param maps
         * @return
         */
        Observable<NLocusSResult> cpathTemp(String url,Map<String,Object> maps);

        /**
         * 获取最后一条轨迹
         * @param url
         * @param params
         * @return
         */
        Observable<NLocusSResult>  getMyLastXcpath( String url,  Map<String,Object> params);

        /**
         * 继续记录轨迹
         * @param url
         * @param params
         * @return
         */
        Observable<NLocusSResult> continueXcpathTemp( String url,  Map<String,Object> params);
        Observable<QueryNumBean>  getHzUnCheckXcjlbCount(String url, Map<String,Object> params);

    }
}
